<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Support\Facades\DB;

class TWarnuser extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('t_warnuser', function (Blueprint $table) {
             $table->engine = 'MyISAM';
             $table->charset = 'utf8';
             $table->collation = 'utf8_general_ci';
            // CONTENT
            $table->increments('wu_index')->nullable(false)->comment('');
			$table->integer('wu_parentid')->nullable(false)->default(0)->comment('');
			$table->string('Wu_name', 64)->nullable()->default(null)->comment('');
			$table->string('Wu_title', 64)->nullable()->default(null)->comment('');
			$table->string('Wu_SmsNumber', 64)->nullable()->default(null)->comment('');
			$table->string('Wu_Emailaddr', 64)->nullable()->default(null)->comment('');
			$table->string('Wu_Telenumber', 64)->nullable()->default(null)->comment('');
			$table->string('wu_type', 255)->nullable(false)->default(0)->comment('');
			$table->datetime('setwarn_time')->nullable(false)->comment('');
			$table->string('warn_content', 64)->nullable(false)->default('')->comment('');
			$table->integer('wu_sendmsgsp')->nullable()->default(null)->comment('');
			$table->string('message', 16)->nullable()->default(11111111)->comment('');
			$table->string('email', 16)->nullable()->default(11111111)->comment('');
			$table->integer('Co_ID')->nullable(false)->comment('');
			$table->string('WeChat_ID', 64)->nullable(false)->comment('');
			$table->unique('wu_index', 'wu_index');
			
        });

        
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('t_warnuser');
    }
}
